package com.shopReduce.dao;



import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;

import com.shopReduce.bean.UserShopReduce;
@Mapper
public interface UserShopReduceMapper {

	@Insert("insert into sys_user_shop_reduce set id=#{id},shopReduceId=#{shopReduceId},userId=#{userId},createDate=#{createDate}")
	public int insert(UserShopReduce userShopReduce);
	
	
	@Delete("delete from sys_user_shop_reduce where  shopReduceId=#{shopReduceId} and userId=#{userId}")
	public int deleteByUserIdAndShopReduceId(@Param("shopReduceId") String shopReduceId,@Param("userId") String userId);
	
	@Select("select * from sys_user_shop_reduce where  shopReduceId=#{shopReduceId} and userId=#{userId}")
	public UserShopReduce getByUserIdAndShopReduceId(@Param("shopReduceId") String shopReduceId,@Param("userId") String userId);
	
	
}
